package com.mega;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;


public class Test1 {
  private WebDriver driver;
  
  @Before
  public void setUp() throws Exception {
    driver = new FirefoxDriver();
    driver.get("http://insofthr.trial.orangehrmlive.com/");
    driver.manage().window().maximize();
  }

  @Test
  public void testCheckingQualificationFunctionality() throws Exception{
	driver.findElement(By.id("txtUsername")).sendKeys("suresh");
	driver.findElement(By.id("txtPassword")).sendKeys("kumar");
	driver.findElement(By.id("btnLogin")).click();
	driver.findElement(By.id("menu_pim_viewMyDetails")).click();
	driver.findElement(By.linkText("Qualifications")).click();
	driver.findElement(By.id("addWorkExperience")).click();
	driver.findElement(By.id("experience_employer")).sendKeys("Insoft");
	driver.findElement(By.id("experience_jobtitle")).sendKeys("Programmer");
	driver.findElement(By.id("experience_from_date")).click();
    driver.findElement(By.linkText("3")).click();
    driver.findElement(By.xpath("//form[@id='frmWorkExperience']/fieldset/ol/li[4]/img")).click();
    driver.findElement(By.linkText("12")).click();
    driver.findElement(By.id("experience_comments")).sendKeys("2years as a programmer");
    driver.findElement(By.id("btnWorkExpSave")).click();
	
	
	
	
    }

  @After
  public void tearDown() throws Exception {
    //driver.quit();
    
  }

 
 
}
